package com.gec.oasys.controller;

import com.gec.oasys.pojo.SysUser;
import com.gec.oasys.service.SysUserService;
import com.gec.oasys.util.SoulPage;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.AuthenticationException;
import org.apache.shiro.authc.UsernamePasswordToken;
import org.apache.shiro.subject.Subject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.Map;

@Controller
public class SysHomeController {
    @RequestMapping("/toSysHome")
    public String toSysHome(){
        return "home";
    }
    @RequestMapping("/toSysConsole")
    public String toSysConsole(){
        return "console";
    }
    @RequestMapping("/logout")
    public String logout(){
        Subject subject=SecurityUtils.getSubject();
        subject.logout();
        return "/sysuser/loginform";
    }
}



